package com.itheima.core;

import com.itheima.domain.Configuration;
/**
 * 创建SqlSession的实现类对象
 */
public class SqlSessionFactory {
    private Configuration cfg;
    public SqlSessionFactory(Configuration cfg) {
        this.cfg = cfg;
    }
    // 创建SqlSession的实现类对象
    public SqlSession openSession(){
        SqlSession sqlSession = new DefaultSqlSession(cfg);
        return  sqlSession;
    }
}
